Repository navigation
[Gutenberg] Add AccessibilityLabel and hint to AztecViewManager - #2368
Conversation
|
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
etoledom
left a comment
There was a problem hiding this comment.
Adding some comments about adding extra labels and hints to Aztec's UITextView.
The main PR review is here: WordPress/gutenberg#23057 (review)
| RCT_EXPORT_VIEW_PROPERTY(accessibilityLabel, NSString) | ||
| RCT_EXPORT_VIEW_PROPERTY(accessibilityHint, NSString) | ||
|
|
There was a problem hiding this comment.
For this to work we should use RCT_REMAP_VIEW_PROPERTY instead.
But my question is, do we want to add extra labels and hints to the Aztec TextView?
Personally, I think it's better for the system to handle accessibility on UITextViews since it's quite complex.
As an example, adding the current label and hint, the VoiceOver will read on Aztec's empty post title:
Label: "Title, Empty. TextField, is editing. 0 width space, character mode, insertion point at end.
Hint: "Update the title. Use the rotor to access misspelled words."
Maybe we are complicating the already complex TextView labels and hint, it might get in the way of the users instead of helping.
Having this label and hint in the wrapper view should be enough to give the user the info needed, then they can just start editing in the TextView after performing the action.
What do you think? @enejb
There was a problem hiding this comment.
Ok, now it makes sense to me on a new post where the title is automatically focused, not having this is confusing. 🤔
In this case probably just the label is enough for the TextView?
And for some reason, even without this change is still working for me. (maybe that's why RCT_EXPORT_VIEW_PROPERTY also works).
There was a problem hiding this comment.
Yeah I am not sure what the best approach is here. To me it also sounds like lot of text.
I just wanted to make sure that the user know that they are editing a the post title when they get dropped in creating a new post or page.
There was a problem hiding this comment.
For this to work we should use RCT_REMAP_VIEW_PROPERTY instead.
So, this was a mistake on my part:
RCT_EXPORT_VIEW_PROPERTY will work just fine, and the property will be set to the view's accessibilityLabel or accessibilityHint property as expected.
RCT_REMAP_VIEW_PROPERTY is used when the JS name doesn't match the View's property name. This gives an opportunity to re-name the property.
There was a problem hiding this comment.
I remove the RCT_EXPORT_VIEW_PROPERTY since it wasn't doing anything.
ec83b3f to
4775a9c
Compare
etoledom
left a comment
There was a problem hiding this comment.
Approved via WordPress/gutenberg#23057 (review)
…g the post or page titl
4775a9c to
540a419
Compare
Fixes #2364
Related GB PR: WordPress/gutenberg#23057
To test:
Before:
See https://cloudup.com/cNlMs6Fbu_F
After: You should get this experience
https://cloudup.com/cjd-RHZpyQM
PR submission checklist:
RELEASE-NOTES.txtif necessary.